package com.ym.doc;

import lombok.Data;
import lombok.experimental.Accessors;
import org.dromara.easyes.annotation.HighLight;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.Analyzer;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.annotation.rely.IdType;

@IndexName("goods")
@Accessors(chain = true)
@Data
public class Goods {
    @IndexId(type = IdType.CUSTOMIZE)
    private String id;
    @HighLight( preTag = "<span style='color:red;'>",postTag = "</span>")
    @IndexField(fieldType = FieldType.TEXT,analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_MAX_WORD)
    private String title;
    @IndexField(fieldType = FieldType.KEYWORD)
    private String brand;
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer price;
}
